<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" class="h-100">
<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1" />
	<title>Spring Boot 2 JWT</title>
	<link rel="stylesheet" href="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/css/bootstrap.min.css"/>
	<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.slim.min.js"></script>
	<script src="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
	<style>
		main > .container {
			padding: 60px 15px 0;
		}
		.footer {
			background-color: #f5f5f5;
		}
	</style>
</head>
<body class="d-flex flex-column h-100">
	<header>
		<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
			<a class="navbar-brand" th:href="@{/}">Spring Boot 2 JWT</a>
			<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
				<span class="navbar-toggler-icon"></span>
			</button>
			<div class="collapse navbar-collapse" id="navbarsExampleDefault">
				<ul class="navbar-nav mr-auto">
					<li class="nav-item active">
						<a class="nav-link" th:href="@{/}">Home <span class="sr-only">(current)</span></a>
					</li>
					<li class="nav-item">
						<a class="nav-link" href="https://github.com/T5750/framework-repositories" target="_blank">GitHub</a>
					</li>
					<li class="nav-item">
						<a class="nav-link" href="https://t5750.github.io/" target="_blank">Blog</a>
					</li>
				</ul>
			</div>
		</nav>
	</header>
	<main role="main" class="flex-shrink-0">
		<div class="container">
			<h4>Please sign in</h4>
			<div>
				<p class="bg-danger" style="padding: 15px;" th:if="${param.error}">Invalid username and password.</p>
				<p class="bg-info" style="padding: 15px;" th:if="${param.logout}">You have been logged out.</p>
			</div>
			<form th:action="@{/auth/login?redirect=/resource/protected-resource}" method="post">
				<div class="form-group">
					<label for="exampleInputUsername1">Username</label>
					<input type="username" class="form-control" id="exampleInputUsername1" placeholder="Username" name="username" value="t5750" autofocus="true"/>
				</div>
				<div class="form-group">
					<label for="exampleInputPassword1">Password</label>
					<input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password" name="password" value="t5750"/>
				</div>
				<button type="submit" class="btn btn-outline-primary">Login</button>
			</form>
		</div>
	</main>
	<footer class="footer mt-auto py-3">
		<div class="container">
			<span class="text-muted">© 2020 T5750</span>
		</div>
	</footer>
</body>
</html>
